package carpediem.xin.tamplate.network;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;

/**
 * Created by zhaijianwei on 16/12/8.
 * <p>
 * 自定义api格式[JSON]：
 * 1.通用格式：{errorCode:<int>, errorMsg:<String>, data:<json string>}
 * 2.错误码表: [码值]含义, 码值非0时data字段为null.
 * [0]成功,
 */

public class HttpResult<T> implements Serializable {

    private static final long serialVersionUID = 1L;

    /*错误码通用处理*/
    @SerializedName("error_code")
    public int errorCode;
    @SerializedName("msg")
    public String errorMsg;
    /*通用数据*/
    public T data;

    public static interface BaseData extends Serializable {

        long serialVersionUID = 1L;
    }
}
